<template>
	<view style="background: #f6f6f6;height: 100vh;">
		<view class="info">
			
			<view class="u-text-center" style="border-radius: 20rpx; padding: 30rpx; margin:40rpx auto;width: 700rpx;margin:40rpx auto;background: #fff;">
				<view class=" u-font-weight">积分余额</view>
				<view class=" u-font-weight" style="color: #3C97FF;font-size: 38rpx;margin: 40rpx 0;" >
					{{info.integral}}积分
				</view>
				
				
				<view class="u-flex " style="justify-content: space-around;">
					<u-button :custom-style="{width:'200rpx',fontSize:'24rpx'}" shape="circle" type="primary" @click="go('/pages/myIntegral/recharge')">充值</u-button>
					<u-button :custom-style="{width:'200rpx',fontSize:'24rpx'}" shape="circle" type="info" @click="go('/pages/myIntegral/detail')">明细</u-button>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				info:''
			}
		},
		onLoad() {
			this.name()
		},
		methods: {
			go(e){
				uni.navigateTo({
					url:e
				})
			},
			name() {
				this.$u.api.userInfo().then(res => {
					this.info = res;
				})
			
			},
			add(){
				
			}
		},
	}
</script>

<style>
	.info{
		background: #3C97FF;
		width: 100%;
		height: 300rpx;
		display: inline-block;
	}
</style>
